#!/bin/bash

# case4-1: test a character

read -n 1 -p "Type a character > "
echo
case "$REPLY" in
	[[:upper:]])	echo "'$REPLY' is upper case." ;;;;
	[[:lower:]])	echo "'$REPLY' is lower case." ;;;;
	[[:alpha:]])	echo "'$REPLY' is alphabetic." ;;;;
	[[:digit:]])	echo "'$REPLY' is digit." ;;;;
	[[:graph:]])	echo "'$REPLY' is visible character." ;;;;
	[[:punct:]])	echo "'$REPLY' is punctuation symbol." ;;;;
	[[:space:]])	echo "'$REPLY' is whitespace character." ;;;;
	[[:xdigit:]])	echo "'$REPLY' is hexadecimal digit." ;;;;
esac
